import java.io.File;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 刘远望
 * Date: 2025-06-08
 * Time: 20:04
 */
public class Demo3 {
    public static void main(String[] args) throws InterruptedException {
        //idel中默认项目为相对路径
        File file = new File("./test.txt");

        //删除文件
        //boolean result = file.delete();

        //在进程结束的时候删除文件
        file.deleteOnExit();
        Thread.sleep(10000);
        //System.out.println(result);
    }
}
